<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
<spring:message  code="pim"/> - <spring:message  code="homepage.project"/>&nbsp;
<c:out value="${bean.project.name}"></c:out> - <spring:message  code="title.project.workspace.tab.report"/>     
</title>	
<link href="<%= request.getContextPath() %>/css/custom.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath() %>/css/v.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.6.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-ui-1.8.14.custom.js"></script>
<%@include file="script/pim-util.jsp" %>
</head>
<body>
<c:if test="${bean.isSigned == true}">
<div id="all">
	<div id="wrapper">
		<div id="mainheader">
			<jsp:include page="include/common/headerSignedIn.jsp" />
		</div> 
		<div id="content-wrapper">
			<div id="top-menu">
			    <jsp:include page="include/common/topMenuHome.jsp" />
			</div>
			<div class="workspace-menu-top">
			    <c:choose>
				    <c:when test="${bean.isAdmin == true}">
				      <jsp:include page="include/common/admin-menu.jsp" />
				    </c:when>
				    <c:otherwise>
				      <jsp:include page="include/common/user-menu.jsp" />
				    </c:otherwise>
				</c:choose>
			</div> 
			
			<div class="tabs-content v-row">
				<table class="hide" style="margin-top: 20px;border-spacing: 1px;">
				<tbody>
					<tr>
						<td width="50%" valign="top">
						 <div><span class="v-title"><spring:message  code="Category"/></span></div>
						 <hr/>
						 <table class="width100 v-table">					    
						      <thead> 
								  <tr class="v-table-header">
								      <td width="40%">#</td>
								      <td width="20%"><spring:message code="title.open" /></td>
								      <td width="20%"><spring:message code="title.closed" /></td>
								      <td width="20%"><spring:message code="title.total" /></td>				         
							      </tr>  
				    		  </thead> 
				    		  <tbody>
							  <c:forEach items="${bean.categoriesReport}" var="categoryReport" varStatus="count">
							  <tr class="${count.count % 2 != 0 ? 'v-table-row-0' : 'v-table-row-1'}"> 
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${categoryReport.name}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${categoryReport.open}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${categoryReport.closed}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${categoryReport.open + categoryReport.closed}"/></td>									   
							  </tr>
							  </c:forEach>						  
						      </tbody>		 
					     </table>
						</td>
										
						<td width="50%" valign="top">
						 <div><span class="v-title"><spring:message  code="Priority"/></span></div>
						 <hr/>
						 <table class="width100 v-table">					    
						      <thead> 
								  <tr class="v-table-header">
								      <td width="40%">#</td>
								      <td width="20%"><spring:message code="title.open" /></td>
								      <td width="20%"><spring:message code="title.closed" /></td>
								      <td width="20%"><spring:message code="title.total" /></td>				         
							      </tr>  
				    		  </thead> 
				    		  <tbody>
							  <c:forEach items="${bean.prioritiesReport}" var="priorityReport" varStatus="count">
							  <tr class="${count.count % 2 != 0 ? 'v-table-row-0' : 'v-table-row-1'}">
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${priorityReport.name}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${priorityReport.open}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${priorityReport.closed}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${priorityReport.open + priorityReport.closed}"/></td>									   
							  </tr>
							  </c:forEach>						  
						      </tbody>		 
					     </table>	 
						</td>			
					</tr>	
							
					<tr>						
						<td width="50%" valign="top">
						 <div><span class="v-title"><spring:message  code="Assigned.to"/></span></div>
						 <hr/>
						 <table class="width100 v-table">					    
						      <thead> 
								  <tr class="v-table-header">
								      <td width="40%">#</td>
								      <td width="20%"><spring:message code="title.open" /></td>
								      <td width="20%"><spring:message code="title.closed" /></td>
								      <td width="20%"><spring:message code="title.total" /></td>				         
							      </tr>  
				    		  </thead> 
				    		  <tbody>
							  <c:forEach items="${bean.assignedToReport}" var="assignedToReport" varStatus="count">
							  <tr class="${count.count % 2 != 0 ? 'v-table-row-0' : 'v-table-row-1'}">
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${assignedToReport.name}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${assignedToReport.open}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${assignedToReport.closed}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${assignedToReport.open + assignedToReport.closed}"/></td>									   
							  </tr>
							  </c:forEach>						  
						      </tbody>		 
					     </table>   
						</td>	
										
						<td width="50%" valign="top">
						 <div><span class="v-title"><spring:message  code="task.reporter"/></span></div>
						 <hr/>
						 <table class="width100 v-table">					    
						      <thead> 
								  <tr class="v-table-header">
								      <td width="40%">#</td>
								      <td width="20%"><spring:message code="title.open" /></td>
								      <td width="20%"><spring:message code="title.closed" /></td>
								      <td width="20%"><spring:message code="title.total" /></td>				         
							      </tr>  
				    		  </thead> 
				    		  <tbody>
							  <c:forEach items="${bean.reportersReport}" var="reporterReport" varStatus="count">
							  <tr class="${count.count % 2 != 0 ? 'v-table-row-0' : 'v-table-row-1'}">
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${reporterReport.name}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${reporterReport.open}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${reporterReport.closed}"/></td>
								<td scope="row" valign="top" nowrap="nowrap" class="left"><c:out value="${reporterReport.open + reporterReport.closed}"/></td>									   
							  </tr>
							  </c:forEach>						  
						      </tbody>		 
					     </table>   
						</td>									
					</tr>			
				</tbody>
				</table>				
			</div>
		</div>
		<div class="footer">
			<jsp:include page="include/common/footer.jsp" />
		</div>
	</div>
</div>
</c:if>
</body>
</html>